package com.cy.config;

/**
 * Created by Administrator on 14-1-26.
 * 系统编码
 *
 * @author zhaonc
 * @since 14-1-26
 */
public class EnumConst {
    /**
     * 服务端返回码
     * 5 系统级别
     * 4 通讯级别
     * 3 服务级(参数 代码 自定义)
     * 2 成功
     */
    public enum RetCode {
        /**
         * 系统级错误
         */
        SYSTEM_ERROR(50001, "系统异常"),

        /**
         * 通讯级错误
         */
        ILLEGAL_REQUEST(40001, "Illegal request非法请求 http"),
        ACCESS_TOKEN_ERROR(40002, "ACCESS_TOKEN失效或错误"),

        /**
         * 服务级(参数 代码 自定义)
         */
        PARAMETER_IS_NULL(30001, "参数为空"),
        PARAMETER_IS_INVALID(30002, "参数非法"),
        USERNAME_OR_PASSWORD_ERROR(30003, "用户名密码错误"),
        USER_NOTEXISTS(30004, "用户不存在"),
        AUTH_FAILD(30005, "认证失败"),
        SMSCODE_FAILD(30006, "短信验证码获取失败"),
        NOT_SIGNIN(30007, "没有登录"),
        NO_PERMISSION(30008, "没有权限"),
        OPERATION_FAILD(30009, "操作失败"),
        ACCOUNT_EXCEPTION(30010, "账户异常"),
        USER_ISEXISTS(30011, "用户存在"),
        ATTENTION_ERROR(30012, "关注失败"),
        WEIXIN_SENDCUSTOM_ERROR(30013, "微信回复消息失败"),
        PASSWORD_ERROR(30014, "密码错误"),
        SMSCODE_REPETITION(30015, "短信验证码获取频繁"),
        LICENSE_INSUFFICE(30016,"使用权不足"),
        USER_NOTACTIVATE(300017, "用户未激活"),
        MODIF_SUCCESS(30020, "修改成功"),

        /**
         * 第三方服务错误
         */
        WX_CREATE_MENU_ERROR(50001, "微信菜单创建失败"),
        WX_DELETE_MENU_ERROR(50002, "微信菜单创建失败"),
        WX_APP_ID_ILLEGAL(50003, "微信APP_ID不合法"),
        WX_APP_SECRET_ILLEGAL(50004, "微信APP_SECRET不合法"),


        /*操作成功,返回*/
        SUCCESS(20001, "有数据"),
        NODATA(20002, "无数据");

        private Integer code;
        private String value;
        public Integer getCode() {
            return code;
        }

        public String getValue() {
            return value;
        }

        private RetCode(Integer code, String value) {
            this.code = code;
            this.value = value;
        }
    }


    public enum ColumnRole {
        GUEST("-1;"),
        MEMBER("0;");

        private String value;


        public String getValue() {
            return value;
        }

        private ColumnRole(String value) {
            this.value = value;
        }
    }

    public enum Option{
        SAYHI("00","0","Hello握手"),
        SETOPTPASS("01", "1", "设置操作密码"),
        SETSTATUSKEEPTIME("02", "2", "设定状态保持时间"),
        SETLOCKORUNLOCK("03", "3", "加解锁设定"),
        SETLIVELOCK("04", "4", "设置离场锁定设定"),
        SETVAILDTIME("05","05","设置有效时间"),
        SETREMINDTIME("06","06","设置有效期提醒天数"),
        RESETGK("07","07","重置gk"),

        GETDEVICESTA("30","30","获取组别参数"),
        WATERTEMPE("31","31","设置本机冲泡类型与温度"),
        WATERYIELD("32","32","设置水量"),
        SETBREWTIME("33", "33", "设置本机冲泡时间"),

        FIRMSURE("52", "52", "固件传输确认"),
        UPDATEFIRM("53", "53", "升级固件传输"),
        UPDATEFIRMSURE("54", "54", "固件升级确认"),
        INITDEVICE("55","55","初始化设备"),
        RESETBREWING("56","56","重置饮品机冲泡数"),

        LIGHTON("61","61","亮灯"),
        AUDIOON("62","62","音频"),
        WATERTEST("63","63","流速"),
        FLOWSET("64","64","流量计设置"),
        SETRTVAL("65", "65", "光耦阈值设置"),
        SETPOWER("66","66","锅炉功率控制"),
        SETPARAM("67","67","锅炉N参数设定"),
        SETPARAMT("68","68","锅炉T参数设定"),
        SETCOEFFI("69","69","加热系数设定"),
        SETTEMPCOMPEN("6A","6A","温度补偿系数设定"),
        SETMODELPARAM("6B","6B","动态温控模型参数"),
        SETMODELXYZ("6C","6C","动态温控模型 XYZ 参数设置"),
        SETLINEAR("6D","6D","直流水泵控制模型参数设置"),

        ECHORESPONSE("80", "80", "Echo响应"),
        GETBREWRECORD("81", "81", "取本机冲泡记录"),

        RESETPASSWORD("90", "90", "重置管理密码"),

        AABREW("A0","A0","AA冲泡"),
        AAVOLUME("A1","A1","AA冲泡设定水量"),
        CLEAR("A00","A00","清洗咖啡机"),
        AATIME("A2","A2","AA冲泡时间参数"),

        GETREGCODE("F0","F0","获取设备码与版本号"),
        SETTIME("F1","F1","饮品机时钟设定"),

        RESETPWD("110","110","重置操作密码"),
        EXIT("99","99","退出");

        private String code;
        private String scode;
        private String value;

        public String getCode() {
            return code;
        }
        public String getScode() {
            return scode;
        }

        public String getValue() {
            return value;
        }

        private Option(String code,String scode, String value) {
            this.code = code;
            this.scode = scode;
            this.value = value;
        }
    }

    public enum OffLinePtion{
        /*sayHi: 'G0',
        setOptPass: 'G1',
        seelpTime: 'G2',
        settingLi: 'G3',

        setValidTime: 'G5',
        setRemindTime: 'G6',
        resetGK: '07',


        getRegCode: 'F0',

        getDeviceSta: 'H0',
        setDeviceBrewCatTem: 'H1',
        setDeviceBrewVolume: 'H2',
        setDeviceBrewTime: 'H3',

        setTime: 'F1',

        firmSure: '52',
        firmUpdate: '53',
        firmInstall: '54',
        initDevice:'55',

        AABrew:'L0',
        AAVolume:'L1',
        AATime:'L2',
        clear: 'A00',

        eCho:'K0',
        brewLog:'81',
        reSetPassword:'90',
        exit: '99',
        FF: 'FF',

        waterTest:'J3',
        flowSet:'J4',
        setDevicePower:'J6'*/
        SAYHI("G0","0","Hello握手"),
        SETOPTPASS("G1", "1", "设置操作密码"),
        SETSTATUSKEEPTIME("G2", "2", "设定状态保持时间"),
        SETLOCKORUNLOCK("G3", "3", "加解锁设定"),
        SETLIVELOCK("G4", "4", "设置离场锁定设定"),
        SETVAILDTIME("G5","05","设置有效时间"),
        SETREMINDTIME("G6","06","设置有效期提醒天数"),
        RESETGK("07","07","重置gk"),

        GETDEVICESTA("H0","30","获取组别参数"),
        WATERTEMPE("H1","31","设置本机冲泡类型与温度"),
        WATERYIELD("H2","32","设置水量"),
        SETBREWTIME("H3", "33", "设置本机冲泡时间"),

        FIRMSURE("52", "52", "固件传输确认"),
        UPDATEFIRM("53", "53", "升级固件传输"),
        UPDATEFIRMSURE("54", "54", "固件升级确认"),
        INITDEVICE("55","55","初始化设备"),

        LIGHTON("61","61","亮灯"),
        AUDIOON("62","62","音频"),
        WATERTEST("63","63","流速"),
        FLOWSET("64","64","流量计设置"),
        SETRTVAL("65", "65", "光耦阈值设置"),
        SETPOWER("66","66","锅炉功率控制"),
        SETPARAM("67","67","锅炉N参数设定"),
        SETPARAMT("68","68","锅炉T参数设定"),
        SETCOEFFI("69","69","加热系数设定"),
        SETTEMPCOMPEN("6A","6A","温度补偿系数设定"),
        SETMODELPARAM("6B","6B","动态温控模型参数"),
        SETMODELXYZ("6C","6C","动态温控模型 XYZ 参数设置"),
        SETLINEAR("6D","6D","直流水泵控制模型参数设置"),

        ECHORESPONSE("K0", "K0", "Echo响应"),
        GETBREWRECORD("81", "81", "取本机冲泡记录"),

        RESETPASSWORD("90", "90", "重置管理密码"),

        AABREW("L0","L0","AA冲泡"),
        AAVOLUME("L1","L1","AA冲泡设定水量"),
        CLEAR("A00","A00","清洗咖啡机"),
        AATIME("L2","L2","AA冲泡时间参数"),

        GETREGCODE("F0","F0","获取设备码与版本号"),
        SETTIME("F1","F1","饮品机时钟设定"),

        RESETPWD("110","110","重置操作密码"),
        EXIT("99","99","退出");

        private String code;
        private String scode;
        private String value;

        public String getCode() {
            return code;
        }
        public String getScode() {
            return scode;
        }

        public String getValue() {
            return value;
        }

        private OffLinePtion(String code,String scode, String value) {
            this.code = code;
            this.scode = scode;
            this.value = value;
        }
    }

}
